package cn.lutu.lutu.service.impl;

import cn.lutu.lutu.mapper.RoutesMapper;
import cn.lutu.lutu.pojo.dto.RouteDTO;
import cn.lutu.lutu.pojo.entity.Route;
import cn.lutu.lutu.service.RouteService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class RouteServiceImpl  implements RouteService {
    @Autowired
    RoutesMapper routesMapper;
    @Override
    public void insert(RouteDTO routeDTO) {
        Route routes = new Route();
        BeanUtils.copyProperties(routeDTO,routes);
        routesMapper.insert(routes);
    }
}
